﻿using System.Collections.Generic;
using System.Linq;
using BitsOfJoy.Core;

namespace BitsOfJoy.Data.Login
{
    public class LocalLoginMapper : ILoginMapper
    {
        private readonly List<User> localUsers = new List<User>
        {
            new User("disco", "martin.j.kristensen@gmail.com"),
            new User("ted", "ted.steen@gmail.com")
        };
        
        public bool Trylogin(string userName, string passwordHash)
        {
            return localUsers.Select(u => u.Alias).Contains(userName);
        }
    }
}
